package com.shujia.java.day18.demo7;

import com.shujia.java.day18.demo6.MyThreadDemo;

/**
 * @Description: Demo1  main的Thread
 * @Author: 王火火
 * @Date: 2019/8/20 14:58
 */
public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        //创建线程
        MyThreadDemo t1 = new MyThreadDemo();
        MyThreadDemo t2 = new MyThreadDemo();
        MyThreadDemo t3 = new MyThreadDemo();

        //改名字
        t1.setName("张三");
        t2.setName("李四");
        t3.setName("王五");
        //启动
        t1.start();
        t2.start();
        t3.start();
        t1.join();

    }
}
